﻿@model WriterStars.Model.Order

@{
    ViewBag.Title = "Status";
    Layout = "~/Views/Shared/_Layout.cshtml";

    var statusColor = "";
    if (Model.OrderState == OrderState.Pending || Model.OrderState == OrderState.Negotiated)
    {
        statusColor = "text-warning";
    }
    else if(Model.OrderState == OrderState.InProgress || Model.OrderState == OrderState.Payed)
    {
        statusColor = "text-success";
    }
}

<div>
    <h4>Order status</h4>
    <hr />
    <dl class="dl-horizontal">

        <dt>
            Order Id 
        </dt>

        <dd>
            @Model.Id
        </dd>

        <dt>
            Status
        </dt>

        <dd>
            <span class="fa fa-fw fa-circle @statusColor"></span>
            @Model.OrderState.ToString()
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.User.FirstName)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.User.FirstName)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.OrderInfo)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.OrderInfo)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Description)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Description)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Keywords)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Keywords)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.KeywordsDensity)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.KeywordsDensity)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.ExpectedPrice)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.ExpectedPrice)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.CreationDate)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.CreationDate)
        </dd>

    </dl>
</div>
<p>
    @Html.ActionLink("Back", "index", "home")
</p>
